package team.headnurse.nursemanagement.dao;

import org.apache.ibatis.annotations.Mapper;
import team.headnurse.nursemanagement.model.Department;

/**
 * @author Eugene-Forest
 */
@Mapper
public interface DepartmentDao {

    /**
     * 插入一条科室记录数据
     * @param department 科室记录对象
     * @return 成功则返回1
     */
    int insert(Department department);

    /**
     * 更新科室表记录
     * @param department 科室记录对象
     * @return 成功则返回1
     */
    int update(Department department);

    /**
     * 通过 科室记录对象 删除一条科室表记录
     * @param department 科室记录对象
     * @return 成功则返回1
     */
    int delete(Department department);

    /**
     * 通过 科室id 删除一条科室表记录
     * @param departmentId 科室id
     * @return 成功则返回1
     */
    int deleteById(String departmentId);

    /**
     * 通过 科室id 查找科室名称
     * @param departmentId 科室id
     * @return 科室名称
     */
    Department selectById(String departmentId);

}
